package org.smile.design.flyweight;

import java.util.HashMap;
import java.util.Map;

public class MemberCenter {
    Map<Integer, Member> members = new HashMap<>();

    public Member obtainMember(Integer number){
        Member member = members.get(number);
        if (member == null){
            member = new Member(number, "www");
            members.put(number, member);
        }
        return member;
    }
}
